package com.kalua.list.harvester.resultprocessing;

import com.kalua.list.dbaccess.product.ProductDAO;
import com.kalua.list.domainmodel.retailer.CrawlBatchInfo;
import com.kalua.list.harvester.errorhandling.SimpleFailureHandler;

public class ResultProcessorFactoryImpl implements ResultProcessorFactory {

	private ProductDAO productDAO;
	
	public ResultProcessorFactoryImpl(ProductDAO productDAO) {
		super();
		this.productDAO = productDAO;
	}

	@Override
	public ResultProcessor createResultProcessor(CrawlBatchInfo batchInfo) {
		ResultProcessorImpl result = 
				new ResultProcessorImpl(batchInfo, this.productDAO, 
														new SimpleFailureHandler(batchInfo));
		return result;
	}
	
	public ProductDAO getProductDAO() { return this.productDAO; }
}